package com.xc.service.service;

import com.xc.service.dao.UserDao;
import com.xc.service.pojo.User;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.HashMap;
import java.util.Map;

@Service
public class UserService {

    @Autowired
    private UserDao userDao;


    public User getUserById(Integer id) {
        Map<String, Object> columnMap = new HashMap<>();
        columnMap.put("id", id);//写表中的列名
        //return userMapper.selectByMap(columnMap);
        return userDao.selectById(id);
    }

}
